<template>
	<view>
		<cu-custom bgColor="bg-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">我的</block>
		</cu-custom>

		<!-- <view class="cu-bar bg-white solid-bottom margin-top">
			<view class="action">
				<text class="cuIcon-title text-orange"></text> 我的
			</view>
		</view> -->
		<view class="cu-list menu margin-top">
			<view class="cu-item arrow" @tap="Tool.navigateTo({url:'./list?type=c'})">
				<view class="content">
					<text class="cuIcon-favor text-grey"></text>
					<text class="text-grey">我的收藏</text>
				</view>
			</view>
			<view class="cu-item arrow" @tap="Tool.navigateTo({url:'./list?type=h'})">
				<view class="content">
					<text class="cuIcon-time text-grey"></text>
					<text class="text-grey">浏览历史</text>
				</view>
			</view>
			<view class="cu-item arrow">
				<view class="content" @tap="delCache">
					<text class="cuIcon-delete text-grey"></text>
					<text class="text-grey">清空数据</text>
				</view>
			</view>
			<view class="cu-item arrow  margin-top">
				<view class="content">
					<text class="cuIcon-service text-grey"></text>
					<button class="cu-btn bg-white text-grey padding-left-xs" open-type="contact">联系客服</button>
				</view>
			</view>
			<view class="cu-item arrow">
				<view class="content">
					<text class="cuIcon-edit text-grey"></text>
					<button class="cu-btn bg-white text-grey padding-left-xs" open-type="feedback">问题反馈</button>
				</view>
			</view>
		</view>
		
		<view class="flex flex-direction padding">
			<button class="cu-btn bg-blue lg" @tap="Tool.reLaunch({url:'/pages/index/index'})">返回首页</button>
		</view>
		
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		methods: {
			delCache() {
				uni.showModal({
					title: '确认操作？',
					content: '清空数据将删除所有个人信息（我的收藏、浏览历史）！',
					success: (res) => {
						if (res.cancel) return false;
						uni.removeStorage({
							key: this.cacheKey.searchHistory
						});
					}
				})
			}
		}
	}
</script>

<style>
	page {
		/* background: #fff; */
	}
</style>
